<?php 
header('Content-type:text/html;charset=utf-8');
getRunTime('start');
for ($i=0; $i < 1000000; $i++){
	$h = 1;
//	echo $h;
}
$a = 1;
while ($a <= 1000000) {
	$a++;
}
echo getRunTime('end');
function getRunTime($pos){
	static $sta;
	if($pos == 'start'){
		$sta = microtime(true);
	}elseif($pos == 'end'){
		$end = microtime(true);
		return $re =$end- $sta;		
	}

}












 ?>